package org.csmzxy.class2333;
import java.util.Scanner;
public class zoye {
    public static void main(String[] args){
        int[] arr1 = {10,12,45,90};
        int[] arr2 = new int[5];
        int daiti = 0;
        Scanner sca = new Scanner(System.in);
        for (int i = 0; i < arr1.length; i++){
            arr2[i] = arr1[i];
        }
        arr1 = arr2;
        System.out.println("请输入你想输入的数字：");
        int shuzi = sca.nextInt();
        arr1[arr1.length-1] = shuzi;
        for (int i = 0; i < arr1.length - 1; i++){
            for (int j = 0; j < arr1.length - i -1; j++){
                if (arr1[j] > arr1[j+1]){
                    daiti = arr1[j];
                    arr1[j] = arr1[j+1];
                    arr1[j+1] = daiti;
                }
            }
        }
        for (int i = 0; i < arr1.length; i++){
            System.out.println(arr1[i]);
        }

    }
}
